home *** CD-ROM | disk | FTP | other *** search
- global gSlot, gPrefPath, gsliderbar, gVolume, XJack, xPal, gdirmovie
-
- on startMovie
- if the machineType = 256 then
- openXLib("XPALETTE.dll")
- set xPal to XPALETTE(mnew)
- openXLib("xmisc.dll")
- set lFred to XMisc(mnew)
- set lSysFolder to lFred(mGetSysDir)
- closeXLib("xmisc.dll")
- set gPrefPath to lSysFolder & "\SFF02.ini"
- else
- openXLib("XPALETTE")
- set xPal to fixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageBottom)
- openXLib("sysfold.xcmd")
- set lSysFolder to systemFolder()
- closeXLib("sysfold.xcmd")
- set gPrefPath to lSysFolder & "Preferences:SFF02 prefs"
- end if
- set XJack to FileIO(mnew, "read", gPrefPath)
- if XJack = -43 then
- set Xwrite to FileIO(mnew, "write", gPrefPath)
- Xwrite(mWriteString, "1255")
- Xwrite(mdispose)
- set XJack to FileIO(mnew, "read", gPrefPath)
- end if
- set lPrefFile to XJack(mReadFile)
- if lPrefFile = EMPTY then
- if the machineType = 256 then
- alert("Please install Fly Fishing School")
- quit()
- else
- alert("No pref file")
- quit()
- end if
- else
- set gsliderbar to char 1 of lPrefFile
- set gsliderbar to integer(gsliderbar)
- set gVolume to char 2 to 4 of lPrefFile
- set gVolume to integer(gVolume)
- if the number of lines in lPrefFile = 1 then
- put field "Preferences-BU" into field "Preferences"
- else
- put lPrefFile into field "Preferences"
- delete line 1 of field "Preferences"
- end if
- end if
- end
-
- on writeFile
- set Xwrite to FileIO(mnew, "write", gPrefPath)
- put gsliderbar & gVolume & RETURN before line 1 of field "Preferences"
- set lWritePrefs to field "Preferences"
- Xwrite(mWriteString, lWritePrefs)
- Xwrite(mdispose)
- delete line 1 of field "Preferences"
- end
-
- on closeMovie
- XJack(mdispose)
- end
-